import { createApp } from 'vue'
import event from './utils/event'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import 'element-plus/theme-chalk/display.css'
import scui from './scui'
import i18n from './locales'
import router from './router'
import store from './store'
import App from './App.vue'
import * as ElIcon from '@element-plus/icons-vue'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
const app = createApp(App)

app.use(store)
app.use(router)
app.use(ElementPlus, {
	locale: zhCn,
})
app.use(i18n)
app.use(scui)
app.use(event)

//挂载app
app.mount('#app')

Object.keys(ElIcon).forEach((key) => {
	app.component(key, ElIcon[key])
})
console.log('Env Check:', {
	title: import.meta.env.VITE_APP_TITLE,        // 应获得类型提示
	apiUrl: import.meta.env.VITE_API_BASE_URL     // 应获得类型提示
})
